import request from '@/utils/request'

// 活动列表
export function findAllRecommends() {
  return request({
    url: `/lejuAdmin/homeRecommend/findAllRecommends`
  })
}

// 新增活动
export function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method: 'post',
    data
  })
}

// 更新活动
export function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method: 'post',
    data
  })
}

// 删除活动
export function delRecommend(recommendId) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
    method: 'delete'
  })
}

// 活动明细
export function homeRecommend(recommendId) {
  return request({
    url: `/lejuAdmin/homeRecommend/${recommendId}`
  })
}

// 商品列表
export function productsByPage(start, limit, data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method: 'post',
    data
  })
}

// 商品列表
export function findAllBrand() {
  return request({
    url: `/lejuAdmin/brand/findAllBrand`
  })
}
